package com.xyy.saas.payment.service;

import com.xyy.saas.payment.dao.model.PayResultOrder;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

public interface PayResultOrderService {
    PayResultOrder selectByPayNoAndChannel(String payNo, String channel);

    PayResultOrder selectByChannelChargeNo(String channelChargeNo);

    List<PayResultOrder> selectListByPayNo(String payNo);

    List<PayResultOrder> selectListByPayNos(List<String> payNos);

    int insertSelective(PayResultOrder payResultOrder);

    /**
     * 根据OrderType统计个渠道商户交易金额
     * @param businessOrderType
     * @param startTime
     * @param endTime
     * @return
     */
    List<PayResultOrder> sumAmountByOrderType(String businessOrderType, String payChannel, Date startTime, Date endTime);

    List<PayResultOrder> queryCountAmountByParamGroup(PayResultOrder queryParam, Date startTime, Date endTime);

    int updateByPrimaryKeySelective(PayResultOrder record);

    PayResultOrder selectByChannelTransactionNo(String channelTransactionNo);

    List<PayResultOrder> queryByChannelTransactionNo(List<String> list);

    List<PayResultOrder> queryNoneRoyaltyList(LocalDateTime beginTime, LocalDateTime endTime);

    List<PayResultOrder> queryPinganCreditListByTime(LocalDateTime beginTime, LocalDateTime endTime);

}
